Telegram Group & Telegram Channel
✏️ Шпаргалка: как можно получить тип класса?

1. Получение типа класса через функцию ::class

Функция ::class возвращает объект KClass, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person::class) // выводит "class Person"
}


2. Получение типа класса через функцию
javaClass

Функция javaClass возвращает объект Class, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person.javaClass) // выводит "class Person"
}


3. Получение типа класса через функцию
::class.java

Вызов функции ::class.java на объекте типа KClass возвращает объект Class, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person::class.java) // выводит "class Person"
}


🐸 Библиотека мобильного разработчика 

#буст
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/mobileproglib/5824
Create:
Last Update:

✏️ Шпаргалка: как можно получить тип класса?

1. Получение типа класса через функцию ::class

Функция ::class возвращает объект KClass, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person::class) // выводит "class Person"
}


2. Получение типа класса через функцию
javaClass

Функция javaClass возвращает объект Class, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person.javaClass) // выводит "class Person"
}


3. Получение типа класса через функцию
::class.java

Вызов функции ::class.java на объекте типа KClass возвращает объект Class, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person::class.java) // выводит "class Person"
}


🐸 Библиотека мобильного разработчика 

#буст

BY Библиотека мобильного разработчика | Android, iOS, Swift, Retrofit, Moshi, Chuck


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/mobileproglib/5824

View MORE
Open in Telegram


Библиотека мобильного разработчика | Android iOS Swift Retrofit Moshi Chuck Telegram | DID YOU KNOW?

Date: |

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.

Export WhatsApp stickers to Telegram on iPhone

You can’t. What you can do, though, is use WhatsApp’s and Telegram’s web platforms to transfer stickers. It’s easy, but might take a while.Open WhatsApp in your browser, find a sticker you like in a chat, and right-click on it to save it as an image. The file won’t be a picture, though—it’s a webpage and will have a .webp extension. Don’t be scared, this is the way. Repeat this step to save as many stickers as you want.Then, open Telegram in your browser and go into your Saved messages chat. Just as you’d share a file with a friend, click the Share file button on the bottom left of the chat window (it looks like a dog-eared paper), and select the .webp files you downloaded. Click Open and you’ll see your stickers in your Saved messages chat. This is now your sticker depository. To use them, forward them as you would a message from one chat to the other: by clicking or long-pressing on the sticker, and then choosing Forward.

Библиотека мобильного разработчика | Android iOS Swift Retrofit Moshi Chuck from us


Telegram Библиотека мобильного разработчика | Android, iOS, Swift, Retrofit, Moshi, Chuck
FROM USA